package com.kfm.spring.dao.impl;

import com.kfm.spring.dao.IAccountDao;

import java.util.Date;

public class AccountDaoImpl implements IAccountDao {

    private String databaseName;
    private Date date;

    public AccountDaoImpl(){
        System.out.println("AccountDaoImpl对象创建了");
    }

    private AccountDaoImpl(String name, Date date){
        System.out.println("AccountDaoImpl对象创建了");
        this.databaseName = name;
        this.date = date;
    }

    public void init(){
        System.out.println("AccountDaoImpl对象初始化了");
    }

    public void destroy(){
        System.out.println("AccountDaoImpl对象销毁了");
    }

    @Override
    public int saveAccount() {
        System.out.println("保存账户信息");
        return 0;
    }

    public String getInfo() {
        return "AccountDaoImpl{" +
                "databaseName='" + databaseName + '\'' +
                ", date=" + date +
                '}';
    }
}
